import service from '@/utils/request'


// 新增 修改规则信息
export const addRule = (data: any) => {
    if (data.id) {
        return service({
            url: '/empi/empiruleinfo/update',
            method: 'post',
            data
        })
    } else {

        return service({
            url: '/empi/empiruleinfo/add',
            method: 'post',
            data
        })
    }
}

// 删除规则信息
export const deleteRule = (data: any) => {
    return service({
        url: '/empi/empiruleinfo/delete',
        method: 'post',
        data
    })
}

// 新增规则字段信息
export const addRuleField = (data: any) => {
    return service({
        url: '/empi/empirulefield/save',
        method: 'post',
        data
    })
}

// 规则字段列表
export const ruleFieldList = (data: any) => {
    return service({
        url: '/empi/empirulefield/page',
        method: 'post',
        data
    })
}